//
//  RegisterViewController.m
//  豆瓣电影
//
//  Created by dllo on 16/6/23.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "RegisterViewController.h"
#import "ShowView.h"

@interface RegisterViewController ()

@end

@implementation RegisterViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    [self config];
    
    [self createNavigationItem];
    
    [self createSubViews];

}

-(void)config
{
    self.navigationItem.title = @"注册";
    
    self.view.backgroundColor = [UIColor whiteColor];
}

-(void)createNavigationItem
{
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithTitle:@"注册" style:UIBarButtonItemStylePlain target:self action:@selector(registerAction:)];
}

-(void)registerAction:(UINavigationItem *)item
{
    
}

-(void)createSubViews
{
    NSArray *labelArray = @[@"用户名", @"密码", @"确认密码", @"邮箱", @"联系方式"];
    NSArray *textArray = @[@"请输入用户名", @"请输入密码", @"请再次输入密码", @"请输入邮箱", @"请输入联系方式"];
    
    for (int i = 0; i < 5; i++) {
        ShowView *showView = [[ShowView alloc]initWithFrame:CGRectMake(80, 150 + i * 60, 250, 50)];
        [self.view addSubview:showView];
    
        showView.textLabel.text = labelArray[i];
        showView.textField.placeholder = textArray[i];
        
        [showView release];
    }
    
}


@end


























